-
Notifications
You must be signed in to change notification settings - Fork 13
feat: add back gc protect callback #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-blobs/pr/94/docs/iroh_blobs/ Last updated: 2025-07-03T11:00:54Z |
45a02c9
to
87cb4f6
Compare
I don't really like add_protected, but I also don't have a better solution right now. Maybe we add it and then strongly discourage using it or mark it as unstable somehow? |
After thinking about this a bit, the best thing to do in the long term would be for docs to store small blobs inline and just bypass blobs entirely, then just use blobs for large blobs. The downside is of course that the small blobs stored in docs won't be available via the blobs API, but I think that is quite reasonable. For large blobs, docs would then use the normal mechanisms (tags and temp tags) to keep the blobs alive, and the overhead would be acceptable because this would be only for a small subset of blobs. |
Based on #95
Description
This adds back a way to externally protect blobs from garbage collection.
Used in n0-computer/iroh-docs#47
Breaking Changes
Notes & open questions
Change checklist